import { defineStore } from "pinia";

type stateType = {
  count: number;
};

const useCounterStore = defineStore("countStore", {
  state: (): stateType => {
    return {
      count: 1
    };
  },
  actions: {
    increment() {
      this.count++;
    },
    subtraction() {
      this.count--;
    }
  }
});

export { useCounterStore };
